Optimal. Leaf size=71 \[ -\frac{\sin ^3(c+d x)}{5 a^2 d}+\frac{3 \sin (c+d x)}{5 a^2 d}+\frac{2 i \cos ^3(c+d x)}{5 d \left (a^2+i a^2 \tan (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.048421, antiderivative size = 71, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091, Rules used = {3500, 2633} \[ -\frac{\sin ^3(c+d x)}{5 a^2 d}+\frac{3 \sin (c+d x)}{5 a^2 d}+\frac{2 i \cos ^3(c+d x)}{5 d \left (a^2+i a^2 \tan (c+d x)\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3500
Rule 2633
Rubi steps
\begin{align*} \int \frac{\cos (c+d x)}{(a+i a \tan (c+d x))^2} \, dx &=\frac{2 i \cos ^3(c+d x)}{5 d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac{3 \int \cos ^3(c+d x) \, dx}{5 a^2}\\ &=\frac{2 i \cos ^3(c+d x)}{5 d \left (a^2+i a^2 \tan (c+d x)\right )}-\frac{3 \operatorname{Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{5 a^2 d}\\ &=\frac{3 \sin (c+d x)}{5 a^2 d}-\frac{\sin ^3(c+d x)}{5 a^2 d}+\frac{2 i \cos ^3(c+d x)}{5 d \left (a^2+i a^2 \tan (c+d x)\right )}\\ \end{align*}
Mathematica [A] time = 0.2722, size = 68, normalized size = 0.96 \[ \frac{\sec (c+d x) (4 i \cos (2 (c+d x))+5 \tan (c+d x)-3 \sin (3 (c+d x)) \sec (c+d x)-12 i)}{20 a^2 d (\tan (c+d x)-i)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.087, size = 108, normalized size = 1.5 \begin{align*} 2\,{\frac{1}{{a}^{2}d} \left ({\frac{-i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{4}}}+{\frac{5/4\,i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{2}}}+2/5\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-5}-3/2\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-3}+{\frac{7}{8\,\tan \left ( 1/2\,dx+c/2 \right ) -8\,i}}+1/8\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{-1} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.24008, size = 161, normalized size = 2.27 \begin{align*} \frac{{\left (-5 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 15 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 5 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i\right )} e^{\left (-5 i \, d x - 5 i \, c\right )}}{40 \, a^{2} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.722779, size = 165, normalized size = 2.32 \begin{align*} \begin{cases} \frac{\left (- 2560 i a^{6} d^{3} e^{10 i c} e^{i d x} + 7680 i a^{6} d^{3} e^{8 i c} e^{- i d x} + 2560 i a^{6} d^{3} e^{6 i c} e^{- 3 i d x} + 512 i a^{6} d^{3} e^{4 i c} e^{- 5 i d x}\right ) e^{- 9 i c}}{20480 a^{8} d^{4}} & \text{for}\: 20480 a^{8} d^{4} e^{9 i c} \neq 0 \\\frac{x \left (e^{6 i c} + 3 e^{4 i c} + 3 e^{2 i c} + 1\right ) e^{- 5 i c}}{8 a^{2}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.15062, size = 126, normalized size = 1.77 \begin{align*} \frac{\frac{5}{a^{2}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i\right )}} + \frac{35 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 90 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 120 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 70 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 21}{a^{2}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - i\right )}^{5}}}{20 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]